class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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