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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.t: E = None
        self.o: G = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.t: E = None
        self.o: G = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

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

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