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

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

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

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

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

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

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

f.y = m
f.r = l
e.y = l
k.w = a
k.s = j
k.q = j
k.v = e
k.x = f
a.v = e
a.s = l
a.z = l
a.y = h
d.q = j
l.w = j
l.y = e
l.t = e
l.x = e
m.w = j
m.s = j
m.q = j
m.v = e
m.x = h
h.y = k
h.r = l
j.v = e
j.s = l
j.z = l
j.y = h
g.q = j
assert d.q.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

f.y = m
f.r = l
e.y = l
k.w = a
k.s = j
k.q = j
k.v = e
k.x = f
a.v = e
a.s = l
a.z = l
a.y = h
d.q = j
l.w = j
l.y = e
l.t = e
l.x = e
m.w = j
m.s = j
m.q = j
m.v = e
m.x = h
h.y = k
h.r = l
j.v = e
j.s = l
j.z = l
j.y = h
g.q = j
assert d.q.z.t.txt == "e"