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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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