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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.w: F = None
        self.q: I = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: H = None
        self.y: I = None
        self.o: F = None
        self.w: E = None
        self.s: I = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: G = None
        self.txt = txt

n = A("n")
l = B("l")
c = C("c")
i = D("i")
f = E("f")
d = F("d")
k = G("k")
j = H("j")
e = I("e")
b = G("b")

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.w: F = None
        self.q: I = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: H = None
        self.y: I = None
        self.o: F = None
        self.w: E = None
        self.s: I = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: G = None
        self.txt = txt

n = A("n")
l = B("l")
c = C("c")
i = D("i")
f = E("f")
d = F("d")
k = G("k")
j = H("j")
e = I("e")
b = G("b")

n.x = f
n.r = j
n.o = c
l.q = d
c.y = d
c.w = d
c.t = b
c.q = e
c.u = j
c.v = j
i.r = k
i.p = k
f.o = n
f.x = e
f.r = l
d.s = i
k.x = e
k.y = e
k.s = e
k.r = j
k.o = d
k.w = f
k.u = f
j.z = f
j.w = c
j.u = d
e.v = i
e.x = k
b.x = e
b.y = e
b.s = e
b.r = j
b.o = d
b.w = f
b.u = f
assert e.x.r.z.r.q.s.p.txt == "k"