class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.y: B = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: E = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.v: D = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

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

j = A("j")
h = B("h")
b = C("b")
g = D("g")
c = E("c")
n = F("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: E = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.v: D = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

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

j = A("j")
h = B("h")
b = C("b")
g = D("g")
c = E("c")
n = F("n")

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