class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.y: C = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.x: B = None
        self.q: D = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.y: D = None
        self.s: E = None
        self.q: C = None
        self.txt = txt

b = A("b")
k = B("k")
i = C("i")
a = D("a")
d = E("d")
h = F("h")
c = A("c")
g = E("g")
j = B("j")
e = D("e")

b.p = k
b.o = e
b.y = i
b.x = i
b.w = h
k.y = g
i.r = a
i.s = e
i.v = g
a.r = d
a.y = d
a.p = e
a.q = e
a.u = e
a.x = k
d.w = i
d.p = h
d.v = c
h.v = b
h.x = j
h.y = e
h.s = d
h.q = i
c.p = j
c.o = e
c.y = i
c.x = i
c.w = h
g.w = i
g.p = h
g.v = c
j.y = g
e.r = g
e.p = a
e.q = a
e.u = a
e.x = k
e.y = d
assert d.w.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.y: C = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.x: B = None
        self.q: D = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.y: D = None
        self.s: E = None
        self.q: C = None
        self.txt = txt

b = A("b")
k = B("k")
i = C("i")
a = D("a")
d = E("d")
h = F("h")
c = A("c")
g = E("g")
j = B("j")
e = D("e")

b.p = k
b.o = e
b.y = i
b.x = i
b.w = h
k.y = g
i.r = a
i.s = e
i.v = g
a.r = d
a.y = d
a.p = e
a.q = e
a.u = e
a.x = k
d.w = i
d.p = h
d.v = c
h.v = b
h.x = j
h.y = e
h.s = d
h.q = i
c.p = j
c.o = e
c.y = i
c.x = i
c.w = h
g.w = i
g.p = h
g.v = c
j.y = g
e.r = g
e.p = a
e.q = a
e.u = a
e.x = k
e.y = d
assert d.w.s.x.txt == "k"