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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

j = A("j")
c = B("c")
m = C("m")
i = D("i")
b = E("b")
g = F("g")
n = A("n")
f = E("f")
e = C("e")

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

j = A("j")
c = B("c")
m = C("m")
i = D("i")
b = E("b")
g = F("g")
n = A("n")
f = E("f")
e = C("e")

j.w = e
j.y = b
j.p = n
j.u = f
j.x = g
c.s = i
c.t = n
c.y = e
m.r = i
i.u = j
i.t = c
i.s = c
i.z = g
i.y = n
i.x = n
b.t = f
b.x = g
b.q = g
b.r = g
b.s = c
b.z = c
g.x = c
n.w = e
n.y = f
n.p = j
n.u = b
n.x = g
f.t = b
f.x = g
f.q = g
f.r = g
f.s = c
f.z = c
e.r = i
assert j.x.x.y.r.txt == "i"