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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.x: E = None
        self.z: B = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
b = C("b")
d = D("d")
f = E("f")
k = F("k")
j = G("j")
e = G("e")
g = B("g")
a = E("a")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.x: E = None
        self.z: B = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
b = C("b")
d = D("d")
f = E("f")
k = F("k")
j = G("j")
e = G("e")
g = B("g")
a = E("a")

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