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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: G = None
        self.o: D = None
        self.u: A = None
        self.w: E = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: G = None
        self.o: D = None
        self.u: A = None
        self.w: E = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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