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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.t: A = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

l = A("l")
d = B("d")
c = C("c")
g = D("g")
m = E("m")
j = F("j")

l.w = m
l.z = j
l.y = j
l.s = g
l.o = c
d.y = c
d.r = m
d.x = m
c.o = m
c.v = j
c.x = j
g.v = d
m.v = d
m.q = d
m.w = l
m.t = l
m.p = l
j.s = d
j.p = d
j.y = c
j.t = g
j.o = l
assert j.y.v.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: F = None
        self.s: D = None
        self.y: F = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.t: A = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

l = A("l")
d = B("d")
c = C("c")
g = D("g")
m = E("m")
j = F("j")

l.w = m
l.z = j
l.y = j
l.s = g
l.o = c
d.y = c
d.r = m
d.x = m
c.o = m
c.v = j
c.x = j
g.v = d
m.v = d
m.q = d
m.w = l
m.t = l
m.p = l
j.s = d
j.p = d
j.y = c
j.t = g
j.o = l
assert j.y.v.t.v.txt == "d"