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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.o: A = None
        self.u: F = None
        self.s: D = None
        self.x: D = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: G = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

k.y = m
k.z = c
m.q = c
m.o = j
m.r = j
m.y = j
m.x = b
m.t = e
f.p = c
f.v = c
f.s = c
f.x = c
f.o = k
f.u = j
f.r = i
c.t = k
c.p = e
b.o = j
b.r = i
b.p = c
b.v = m
j.r = i
i.p = e
i.v = b
e.q = c
e.o = j
e.r = j
e.y = j
e.x = b
e.t = g
g.q = c
g.o = j
g.r = j
g.y = j
g.x = b
g.t = e
assert e.t.x.r.v.r.p.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.o: A = None
        self.u: F = None
        self.s: D = None
        self.x: D = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: G = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

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