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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.s: E = None
        self.x: G = None
        self.u: G = None
        self.t: B = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.y: B = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

m = A("m")
c = B("c")
j = C("j")
l = D("l")
k = E("k")
g = F("g")
h = G("h")
b = D("b")

m.p = c
m.q = j
m.t = j
m.u = g
m.s = k
c.v = g
j.y = l
j.o = h
j.x = h
j.u = h
j.s = k
j.z = k
j.t = c
l.z = k
k.p = c
k.v = j
g.x = l
g.z = j
h.x = j
h.r = k
h.y = c
h.o = c
h.t = m
b.z = k
assert k.v.y.z.v.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: C = None
        self.u: F = None
        self.s: E = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.s: E = None
        self.x: G = None
        self.u: G = None
        self.t: B = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.y: B = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

m = A("m")
c = B("c")
j = C("j")
l = D("l")
k = E("k")
g = F("g")
h = G("h")
b = D("b")

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