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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

a = A("a")
i = B("i")
k = C("k")
l = D("l")
f = E("f")
d = F("d")
j = G("j")
c = D("c")
m = E("m")
h = A("h")

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

a = A("a")
i = B("i")
k = C("k")
l = D("l")
f = E("f")
d = F("d")
j = G("j")
c = D("c")
m = E("m")
h = A("h")

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