class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: E = None
        self.z: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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