class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.t: E = None
        self.r: A = None
        self.u: G = None
        self.s: F = None
        self.q: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: F = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: F = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

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

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

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

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