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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.p: G = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.v: E = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.p: G = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.v: E = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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