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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.v: G = None
        self.p: D = None
        self.y: A = None
        self.t: F = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.v: A = None
        self.w: B = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

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

n = A("n")
f = B("f")
d = C("d")
l = D("l")
a = E("a")
h = F("h")
i = G("i")
c = D("c")
b = B("b")

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.v: G = None
        self.p: D = None
        self.y: A = None
        self.t: F = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.v: A = None
        self.w: B = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

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

n = A("n")
f = B("f")
d = C("d")
l = D("l")
a = E("a")
h = F("h")
i = G("i")
c = D("c")
b = B("b")

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