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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.v: A = None
        self.q: A = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: A = None
        self.v: A = None
        self.t: F = None
        self.s: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.v: A = None
        self.q: A = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: A = None
        self.v: A = None
        self.t: F = None
        self.s: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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