class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: F = None
        self.u: E = None
        self.q: B = None
        self.o: E = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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