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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.v: A = None
        self.z: B = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

l = A("l")
j = B("j")
g = C("g")
e = D("e")
m = E("m")
k = F("k")
b = F("b")
h = E("h")

l.x = k
l.p = e
j.o = g
j.q = g
g.s = e
g.w = l
g.v = j
g.y = j
g.o = m
g.x = b
e.w = l
e.z = b
e.p = b
m.p = g
m.x = g
m.u = g
m.v = l
m.y = l
m.z = j
k.w = e
k.s = j
k.x = b
b.w = e
b.s = j
b.x = k
h.p = g
h.x = g
h.u = g
h.v = l
h.y = l
h.z = j
assert j.o.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.v: A = None
        self.z: B = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

l = A("l")
j = B("j")
g = C("g")
e = D("e")
m = E("m")
k = F("k")
b = F("b")
h = E("h")

l.x = k
l.p = e
j.o = g
j.q = g
g.s = e
g.w = l
g.v = j
g.y = j
g.o = m
g.x = b
e.w = l
e.z = b
e.p = b
m.p = g
m.x = g
m.u = g
m.v = l
m.y = l
m.z = j
k.w = e
k.s = j
k.x = b
b.w = e
b.s = j
b.x = k
h.p = g
h.x = g
h.u = g
h.v = l
h.y = l
h.z = j
assert j.o.s.z.txt == "b"