class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: E = None
        self.x: C = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.q: D = None
        self.p: E = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

h = A("h")
f = B("f")
j = C("j")
i = D("i")
b = E("b")
c = F("c")
g = C("g")
l = B("l")

h.w = c
h.y = b
h.x = g
h.z = g
f.u = c
f.s = g
f.q = i
f.p = b
f.o = j
f.x = l
j.y = g
j.p = g
j.o = h
i.q = l
b.y = l
b.s = h
c.s = h
c.x = h
c.p = f
c.y = i
g.y = j
g.p = j
g.o = h
l.u = c
l.s = j
l.q = i
l.p = b
l.o = g
l.x = f
assert i.q.x.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: E = None
        self.x: C = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.q: D = None
        self.p: E = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

h = A("h")
f = B("f")
j = C("j")
i = D("i")
b = E("b")
c = F("c")
g = C("g")
l = B("l")

h.w = c
h.y = b
h.x = g
h.z = g
f.u = c
f.s = g
f.q = i
f.p = b
f.o = j
f.x = l
j.y = g
j.p = g
j.o = h
i.q = l
b.y = l
b.s = h
c.s = h
c.x = h
c.p = f
c.y = i
g.y = j
g.p = j
g.o = h
l.u = c
l.s = j
l.q = i
l.p = b
l.o = g
l.x = f
assert i.q.x.o.y.txt == "g"